package com.example.study.controller;

import com.example.study.api.UserRemoteClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

/**
 * @description：
 * @author: liqiancheng
 * @createTime: 2021/8/18 15:09
 **/
@RestController
public class UserController  {


    @Resource(name = "userService")
    private UserRemoteClient userRemoteClient;

    @GetMapping("/user/hello")
    public String hello() {
        return userRemoteClient.hello();
    }

    @GetMapping
    public String aa(HttpServletRequest request) {
        return "hello world, uri:" + request.getRequestURI();
    }
}
